Returns the natural logarithm of a number.
与えられた数値の自然対数を返します。
Log (Number)
Log (Number)
Double
倍精度
Number: Any numeric expression that you want to calculate the natural logarithm for.
Number: 自然対数を計算する数値表式。
The natural logarithm is the logarithm to the base e. Base e is a constant with an approximate value of 2.718282...
自然対数とは、底を e とした対数のことです。底に使う e という記号は、2.718282... という定数値を示します。
You can calculate logarithms to any base (n) for any number (x) by dividing the natural logarithm of x by the natural logarithm of n, as follows:
その他の数値を底とする対数も、自然対数を基に計算できます。たとえば数値 (x) について数値 (n) を底とする対数を計算するには、数値 x の自然対数を、数値 n の自然対数で割ります。
Log n(x) = Log(x) / Log(n)
Log n(x) = Log(x) / Log(n)
Sub ExampleLogExp
Sub ExampleLogExp
Dim a as Double
Dim a as Double
Dim const b1=12.345e12
Dim const b1=12.345e12
Dim const b2=1.345e34
Dim const b2=1.345e34
a=Exp( Log(b1)+Log(b2) )
a=Exp( Log(b1)+Log(b2) )
MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"
MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"
end sub
end sub